package com.projects.android.dto;

import org.json.JSONException;
import org.json.JSONObject;

public class OrderDetailDTO {
	private int ID;
	private int IDOrder;
	private int IDFood;
	private int Quantity;
	private float Price;
	
	public void initObject(JSONObject data){
		try {
			ID = Integer.valueOf(data.getString("ID"));
			IDOrder = Integer.valueOf(data.getString("IDOrder"));
			IDFood = Integer.valueOf(data.getString("IDFood"));
			Quantity = Integer.valueOf(data.getString("Quantity"));
			Price = Float.valueOf(data.getString("Price"));
		} catch (NumberFormatException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (JSONException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
	
	public int getID() {
		return ID;
	}
	public void setID(int iD) {
		ID = iD;
	}
	public int getIDOrder() {
		return IDOrder;
	}
	public void setIDOrder(int iDOrder) {
		IDOrder = iDOrder;
	}
	public int getIDFood() {
		return IDFood;
	}
	public void setIDFood(int iDFood) {
		IDFood = iDFood;
	}
	public int getQuantity() {
		return Quantity;
	}
	public void setQuantity(int quantity) {
		Quantity = quantity;
	}
	public float getPrice() {
		return Price;
	}
	public void setPrice(float price) {
		Price = price;
	}
}
